﻿<%@ MasterType VirtualPath="~/Main.master" %>
<%@ Import Namespace="Touch2Like.Tags" %>

<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true"
    CodeBehind="Orders.aspx.cs" Inherits="Touch2Like.Web.Customer.Orders" %>

<asp:Content ID="Content1" ContentPlaceHolderID="headcontent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="maincontent" runat="server">
    <div id="header_bottom">
        <div class="container clearfix">
            <div class="sidebar" style="width: 158px;">
            <div><a href="/Customer/Dashboard.aspx">Dashboard</a></div>
                <div>
                    <a href="/Customer/Main.aspx">Tags</a></div>
                <div>
                    <a href="/Customer/Orders.aspx">Orders</a></div>
                <div>
                    <a href="/Customer/Profile.aspx">My Profile</a></div>
                <div>
                    <a href="/Customer/statistics.aspx">Statistics</a></div>
            </div>
            <div class="grid8">
                <asp:GridView ID="GridView_Order" runat="server" AutoGenerateColumns="false" AllowPaging="true"
                    AllowSorting="true" PageSize="20" OnPageIndexChanging="GridView_Order_PageIndexChanging"
                    OnSorting="GridView_Order_Sorting" OnRowDataBound="GridView_Order_RowDataBound">
                    <Columns>
                        <asp:TemplateField HeaderText="Order Number">
                            <ItemTemplate>
                                <div class="ordertable_wrapper">
                                    <table>
                                        <tr>
                                            <td valign="top" style="vertical-align: top">
                                                <table>
                                                    <tr>
                                                        <td>
                                                            Order Placed:
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            <span style="font-weight: bold; font-size: 14px; line-height: 25px;">
                                                                <%#Eval("CreateDate")%></span>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            Order Number: <span style="color: Blue;">
                                                                <%#Eval("ListID")%></span>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            Status:
                                                            <%#Eval("OrderStatus").ToString() == "0" ? "not paid" : (Eval("OrderStatus").ToString() == "2"?"paid":"complete")%>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td>
                                                            Order Total: <span style="color: Red;">$<%#Eval("OrderPrice")%></span>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                            <td width="30">
                                                &nbsp;
                                            </td>
                                            <td valign="top" style="vertical-align: top">
                                                <asp:Repeater ID="Repeater_Cart" runat="server">
                                                    <ItemTemplate>
                                                        <table>
                                                            <tr>
                                                                <td>
                                                                    <a href="/goods/Detail.aspx?ID=<%#Server.UrlEncode(Utility.Encryption.Encrypt(Eval("SKU").ToString())) %>"
                                                                        style="height: 130px; line-height: 120px;">
                                                                        <img src="<%#Eval("GoodsPic") %>" style="vertical-align: middle; width: 100px; height: 100px;
                                                                            margin-top: 10px;" /></a>
                                                                </td>
                                                                <td valign="top" style="vertical-align: top;">
                                                                    <table style="margin-top: 10px;">
                                                                        <tr>
                                                                            <td>
                                                                                <span style="color: Blue;">
                                                                                    <%#Eval("GoodsName") %></span>
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td>
                                                                                $<%#Eval("GoodsPrice") %>x<%#Eval("GoodsCount") %>
                                                                            </td>
                                                                        </tr>
                                                                        <tr>
                                                                            <td>
                                                                                Total: $<%#Eval("OrderPrice") %>
                                                                            </td>
                                                                        </tr>
                                                                    </table>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </ItemTemplate>
                                                </asp:Repeater>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <HeaderStyle CssClass="hidden" />
                </asp:GridView>
            </div>
        </div>
    </div>
</asp:Content>
